﻿using System;
using FluentNHibernate.Mapping;
using Caramel.NHibernate.Membership.Entities;

namespace Caramel.NHibernate.Membership.Mapping
{
	public class aspnet_ApplicationsMapping : ClassMap<aspnet_Applications>
	{
		public aspnet_ApplicationsMapping()
		{
			this.
				Table("aspnet_Applications");

			this.
				Id(e => e.ID).
				Column("ApplicationId").
				GeneratedBy.
				GuidComb();

			this.
				Map(e => e.ApplicationName).
				Length(256).
				Unique().
				Not.
				Nullable();

			this.
				Map(e => e.LoweredApplicationName).
				Length(256).
				Unique().
				Not.
				Nullable();

			this.
				Map(e => e.Description).
				Length(256).
				Nullable();
		}
	}
}
